home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / software / programming / c / sipp / include / bezier.h next >
Encoding:
C/C++ Source or Header  |  1978-11-24  |  1.5 KB  |  72 lines

  1. /**
  2.  ** sipp - SImple Polygon Processor
  3.  **
  4.  **  A general 3d graphic package
  5.  **
  6.  **  Copyright Equivalent Software HB  1992
  7.  **
  8.  ** This program is free software; you can redistribute it and/or modify
  9.  ** it under the terms of the GNU General Public License as published by
  10.  ** the Free Software Foundation; either version 1, or any later version.
  11.  ** This program is distributed in the hope that it will be useful,
  12.  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  ** GNU General Public License for more details.
  15.  ** You can receive a copy of the GNU General Public License from the
  16.  ** Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  **/
  18.  
  19. /**
  20.  ** bezier.h - Types and defines needed by bezier.c
  21.  **/
  22.  
  23. #ifndef BEZIER_H
  24. #define BEZIER_H
  25.  
  26.  
  27. #include <geometric.h>
  28.  
  29.  
  30. #define PATCHES     1
  31. #define CURVES      2
  32. #define NVERTICES   3
  33. #define NPATCHES    4
  34. #define NCURVES     5
  35. #define VERTEX_LIST 6
  36. #define PATCH_LIST  7
  37. #define CURVE_LIST  8
  38. #define INTEGER     9
  39. #define FLOAT       10
  40.  
  41.  
  42. typedef union {
  43.     int    intval;
  44.     double floatval;
  45. } Tokenval;
  46.  
  47.  
  48. typedef struct {
  49.     int cp[4];
  50. } Bez_Curve;
  51.  
  52. typedef struct {
  53.     int cp[4][4];
  54. } Bez_Patch;
  55.  
  56. typedef struct {
  57.     int         type;
  58.     int         nvertex;
  59.     Vector *vertex;
  60.     union {
  61.         int ncurves;
  62.         int npatches;
  63.     } n;
  64.     union {
  65.         Bez_Curve *ccp;
  66.         Bez_Patch *pcp;
  67.     } cp;
  68. } Bez_Object;
  69.  
  70.  
  71. #endif /* BEZIER_H */
  72.